package com.example.dddsample.gateway.Handler;

import org.apache.kafka.clients.consumer.Consumer;
import org.springframework.kafka.listener.KafkaListenerErrorHandler;
import org.springframework.kafka.listener.ListenerExecutionFailedException;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;

/**
 * 报错异常类监听
 * @author: bebm
 * @date: 2022/4/6 11:29
 * @description:
 */
@Component
public class KafkaCommonListenerErrorHandler implements KafkaListenerErrorHandler {
    /**
     *
     * @param message
     * @param e
     * @return
     */
    @Override
    public Object handleError(Message<?> message, ListenerExecutionFailedException e) {
        return null;
    }

    /**
     *
     * @param message
     * @param exception
     * @param consumer
     * @return
     */
    @Override
    public Object handleError(Message<?> message, ListenerExecutionFailedException exception, Consumer<?, ?> consumer) {
        return null;
    }
}
